package com.youfang.sixthmedia.message;

import java.util.List;

import com.youfang.sixthmedia.common.YoufangContext;
import com.youfang.sixthmedia.net.Pair;
import com.youfang.sixthmedia.net.Request;

/**
 * 获取新楼房列表请求
 * 
 * @author Administrator
 * 
 */
// controller=house&action=gethouses&pagesize=20&page=%d&cityid=%d&propertyid=%d&areaid=%d&houserange=%d&getprivileg=%d&grouponbydev=%d",
// _pageIndex, _cityId, _property, _areaId, _priceId, _isDiscount ? 1 : 0,
// _groupon];
public class GethousesRequest extends Request {

	private String keyword;

	private int cityid; // 城市

	private int propertyid;// 物业类型
	private int areaid; // 区域版块
	private int houserange;// 价位区间

	private int getprivileg; // 是否优惠
	private int grouponbydev;// 是否团购

	private int pagesize = YoufangContext.LIST_PAGE_SIZE;
	private int page = 1;

	@Override
	public List<Pair> getParams() {
		return Pair.p("controller", "house").p("action", "gethouses")
				.p("cityid", cityid).p("propertyid", propertyid)
				.p("areaid", areaid).p("houserange", houserange)
				.p("getprivileg", getprivileg).p("grouponbydev", grouponbydev)
				.p("keyword", keyword).p("page", page).p("pagesize", pagesize)
				.get();
	}

	@Override
	public void genMetaData() {

	}

	// set groupon flag...
	public void groupon() {

		this.grouponbydev = 1;
	}

	// set discount flag...
	public void discount() {
		this.getprivileg = 1;
	}

	public int getCityid() {
		return cityid;
	}

	public void setCityid(int cityid) {
		this.cityid = cityid;
	}

	public int getPropertyid() {
		return propertyid;
	}

	public void setPropertyid(int propertyid) {
		this.propertyid = propertyid;
	}

	public int getAreaid() {
		return areaid;
	}

	public void setAreaid(int areaid) {
		this.areaid = areaid;
	}

	public int getHouserange() {
		return houserange;
	}

	public void setHouserange(int houserange) {
		this.houserange = houserange;
	}

	public int getGetprivileg() {
		return getprivileg;
	}

	public void setGetprivileg(int getprivileg) {
		this.getprivileg = getprivileg;
	}

	public int getGrouponbydev() {
		return grouponbydev;
	}

	public void setGrouponbydev(int grouponbydev) {
		this.grouponbydev = grouponbydev;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public int getPagesize() {
		return pagesize;
	}

	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

}
